import java.util.Scanner;

public class JavaBasics {

	public void readWriteFromConsole() {

		Scanner scanner = new Scanner(System.in);

		System.out.println("Please input a string");

		String message = scanner.next();

		System.out.println("your input is " + message);

		scanner.close();

	}

	public void basicDataTypes() {
		boolean result;
		byte byteVariable;
		short shortVariable;
		int intVariable;
		long longVariable;
		float floatVariable;
		double doubleVariable;
		char charVariable;
		String message;

		result = false;
		result = true;
		System.out.println("Result value is : " + result);

		// byte can hold -2power7 to 2power7 - 1 i.e -128 to 127

		byteVariable = 100;

		System.out.println("Byte value is :" + byteVariable);

		byteVariable = (byte) 130;

		System.out.println("Byte value for 130 is :" + byteVariable);

		charVariable = 'H';
	}

	public static void main(String[] args) {
		JavaBasics basics = new JavaBasics();

		// basics.readWriteFromConsole();
		basics.basicDataTypes();

	}

}
